-- background: 12680 from stack: in -- bmap block id: 17286 -- flags: 0000 -- background id: 0 -- name: Briefing ----- HyperTalk script ----- on openCard global fldname put empty into fldname end openCard on closeCard global fldname if fldname <> empty then enterKey end if end closeCard on enterKey global store,fldname set the style of cd fld id fldname to rectangle set the lockText of cd fld id fldname to true set the rect of cd fld id fldname to store --put empty --hide message --pass enterKey end enterKey --Grid Maker --by Ted Tripp --First Ammendment Computing --335 Swift Street --Santa Cruz, CA 95060 --408 528-5293 --script for creating a matrix of fields with row and column properties --each card field gets a name corrsponding to its position in the matrix --row names for fields contained in the variable, Vertical --column names for fields contained in the variable, Horizontal --Horizontal & Vertical reference bkgnd fields "Horizontal" & "Vertical" on gone clearfields pasteFields makeFields solvesNamer envNamer end gone on pasteFields --prepare card field 1, including script, font, etc put field "Horizontal" into Horizontal put field "Vertical" into Vertical --makes the correct number of fields for the grid choose field tool click at the loc of card field 1 doMenu "Copy Field" put the number of lines of Horizontal into Horz put the number of lines of Vertical into Vert repeat Horz * Vert - 1 times doMenu "Paste Field" end repeat end pasteFields on makeFields --sets up the grid --assumes sufficient fields (using PasteFields) --determine size of grid put field "Horizontal" into Horizontal put field "Vertical" into Vertical put the number of lines of Horizontal into Horz put the number of lines of Vertical into Vert --set the inter-grid spacing (if any) --first, the horizontal spacing put the width of card field 1 + 9 into Wide --next, the vertical spacing put the height of card field 1 + 8 into High --first row, initialize variables put 1 into start put Horz into finish put item 1 of the rect of card field start into x1 put item 2 of the rect of card field start into y1 put item 3 of the rect of card field start into x2 put item 4 of the rect of card field start into y2 repeat with i = start to finish set the rect of card field i to x1,y1,x2,y2 put (x1 + Wide) into x1 put (x2 + Wide) into x2 end repeat repeat Vert-1 times put item 1 of the rect of card field start into x1 put item 2 of the rect of card field start into y1 put item 3 of the rect of card field start into x2 put item 4 of the rect of card field start into y2 put finish + 1 into start put finish + Horz into finish put y1 + High into y1 put y2 + High into y2 repeat with i = start to finish set the rect of card field i to x1,y1,x2,y2 put (x1 + Wide) into x1 put (x2 + Wide) into x2 end repeat end repeat end makefields on solvesNamer --sets the column names for each field in the grid put field "Horizontal" into Horizontal put the number of lines of Horizontal into Horz --sets the row names for each field in the grid put field "Vertical" into Vertical put the number of lines of Vertical into Vert --initialize variables put 1 into start put 0 into finish --iterative call repeat with x = 1 to Vert get line x of Vertical put finish + 1 into start put x * Horz into finish repeat with i = start to finish set the name of cd field i to it end repeat end repeat end solvesNamer on envNamer --sets the column names for each field in the grid put field "Horizontal" into Horizontal put the number of lines of Horizontal into Horz --sets the row names for each field in the grid put field "Vertical" into Vertical put the number of lines of Vertical into Vert repeat with i = 1 to Vert * Horz put the number of card field i into fldNumber --index by the modulus of the horizontal matrix put fldNumber mod Horz into Indexer if Indexer = 0 then get the short name of card field i put line Horz of Horizontal & space before it set the name of card field i to it else get the short name of card field i put line Indexer of Horizontal & space before it set the name of card field i to it end if end repeat end envNamer on namer solvesNamer envNamer end namer on clearfields --clears out the all the card fields choose field tool repeat with i = the number of card fields down to 2 click at the loc of cd fld i doMenu "Clear Field" end repeat end clearfields on texter --for fine tuning the appearance of each field in the grid repeat with i = 1 to the number of cd flds set the textHeight of cd fld i to 19 end repeat end texter -- part 6 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=0 top=92 right=304 bottom=204 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 26 -- part name: Vertical -- part 5 (field) -- low flags: 80 -- high flags: 0001 -- rect: left=464 top=68 right=212 bottom=508 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: Horizontal -- part 19 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=168 top=303 right=342 bottom=344 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 242 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Tell ----- HyperTalk script ----- on mouseLeave put empty into fld "Tell" end mouseLeave on mouseEnter put "'Message' Field" & return & "displays information" into fld "Tell" end mouseEnter